import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from "vant";
import * as vant from "vant";
import { Notify } from 'vant';
import "vant/lib/index.css";
import { createI18n } from 'vue-i18n';

const messages = {
  zh: {
    name: '姓名',
    position: '职位',
    businessGroup: '业务组组',
    department: '部门',
    company: '公司',
    submit: '提交',
    cardDetail: '名片详情',
    submitSuccess: '提交成功',
    submitFail: '提交失败',
    fetchFail: '获取详情失败',
    email: '邮箱',
    moblePhone: '手机号',
    phone: '固定电话',
    website: '网址',
    workAddress: '工作地址',
    headImg: '头像',
    vCardQr: '二维码',
  },
  en: {
    name: 'Name',
    position: 'Position',
    businessGroup: 'Business Group',
    department: 'Department',
    company: 'Company',
    submit: 'Submit',
    cardDetail: 'Card Detail',
    submitSuccess: 'Submit Success',
    submitFail: 'Submit Failed',
    fetchFail: 'Fetch Failed',
    email: 'Email',
    moblePhone: 'Mobile',
    phone: 'Phone',
    website: 'Website',
    workAddress: 'Work Address',
    headImg: 'Avatar',
    vCardQr: 'QR Code',
  }
};

const i18n = createI18n({
  legacy: false,
  locale: 'zh',
  fallbackLocale: 'en',
  messages
});

const app = createApp(App);

app.use(Vant);

app.use(vant.Lazyload);

app.use(store);
app.use(router);
app.use(Notify);
app.use(i18n);

app.mount("#app");
